<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Promise的三种状态</title>
</head>

<body>

</body>

<script>
    const promise1 = new Promise((resolve, reject) => {

    })
    const promise2 = new Promise((resolve, reject) => {
        setTimeout(() => {
            console.log('promise2 before', promise2);
            resolve();
            console.log('promise2 after' , promise2);
        })
    })
    const promise3 = new Promise((resolve, reject) => {
        setTimeout(() => {
            reject();
        })
    })

    console.log('promise1', promise1);
    console.log('promise2', promise2);
    console.log('promise3', promise3);


</script>

</html>